home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr18
/
ter99.zip
/
DOCS._XE
/
ANSMUSIC.DOC
next >
Wrap
Text File
|
1992-09-20
|
5KB
|
132 lines
ANSI MUSIC
──────────────────────────────────────────────────────────────────────────────
This is the specifications Terminate follows, if you are a sysop you
could include ansi music in your menus and then users that uses
Terminate or another terminal program could here melodies or fancy
tunes when they enter the menu. Other terminal program will just
skip the codes, nothing else will happend. Maybe it will look weird
on your screen, because your BBS system does not understand the codes.
But it does'nt matter at all.
I use this little code in my LOGO.ANS (Remote Access file shown at login):
MB O3 T120 L2CO4CO3L6BGABO4L2CO3L2CL2AL1GL2CFL4EL6CDEL4FL3DL6O2BO3CDL4EL2C
D
As you can see i clears the screen ([2J), right after the sound codes so
programs that does not support ansi music won't see the codes.
It's really simple to create this music. Hopefully many more will start
using those codes inside online games etc.
Small examples:
MB O3 Sets octave 3
MB T120 Sets tempo to 120 (default)
You can use several statements on each line. Could it be more simple.
It's exactly the same command as the BASIC command called PLAY from
IBM BASIC or GW-BASIC and all those.
------------------------------------- CUT -------------------------------------
MUSIC:
Syntax: ESC[MF T120 O2C8D8E8F8G8 (All lines must end with ASCII 14)
Music strings in the BASIC Play format are supported.
Multiple strings per line may be entered.
Music strings should begin with the characters "<esc>[M"
where <esc> is a true ESC character (DEC 27, Hex 1B).
Please refer to your BASIC manual for information on the
BASIC Play commands. The following are all valid for
beginning a Music string in SMILE: MF, MB, MN, ML, MS, M .
Although MB (Music Background) is valid, true backgroud
music is NOT supported.
Music strings should end with the musical note character
(DEC 14, Hex 0E, CTRL-N). If this character is missing,
SMILE will look for the next ESC character or the
end-of-line marker to terminate the music string. This
option was added to try and catch as many incorrectly
formated music strings as possible. However, for
compatiblity with other viewers, I suggest you always end
your music strings with CTRL-N (DEC 14)
SOUND:
( Thanks to Julie Ibarra, author of ANSIPLAY for this idea )
Syntax:
ESC[MF Freq; Duration; Cycles; CycleDelay;Variation (DEC14)
Custom Sounds are supported in SMILE by using a SOUND CODE
similar to that found in BASIC and the program ANSIPLAY.
However, the SOUND generator in SMILE differs from the
SOUND command in BASIC. Therefore, different frequency
values must be used to produce the musical notes. These
are listed somewhere down the page.
The SOUND statement must begin and end in the same manner
discussed above for a normal music string. The SOUND CODE
consists of the following parameters serparated by a
semicolon (;) :
FREQ : Frequency of note to be played. The affective
range of frequencies is 0 to 7904.
(0..65535)
DURATION : Time, in milliseconds, the note should be played.
(0..65535)
CYCLES : Number of times to repeat Frequency/Duration.
(0..65535)
DELAY : Time, in milliseconds, between cycles.
(0..65535)
VARIATION: Frequency value is changed by this number for
each CYCLE the note is played.
(-65535..65535)
(NOTE: 1 second = 1000 milliseconds)
Press ESC to exit a DURATION or DELAY action. You may
have to press ESC a couple of times to completely exit
a sound sequence.
SOUND CODE Musical Note Frequency Values (7 Octives):
C C# D D# E F F# G G# A A# B
65 69 73 78 82 87 92 98 104 110 116 123
131 139 147 156 165 175 185 196 208 220 233 247
262 278 294 312 330 350 370 392 416 440 466 494
524 556 588 624 660 700 740 784 832 880 932 988
1048 1112 1176 1248 1320 1400 1480 1568 1664 1760 1864 1976
2096 2224 2352 2496 2640 2800 2960 3136 3328 3520 3728 3952
4192 4448 4704 4992 5280 5600 5920 6272 6656 7040 7456 7904
One advantage of the SOUND CODE is the ability to place a
PAUSE in your ANSI screens without having to use a
multitude of ESC[s codes. Just use a SOUND CODE with the
DELAY set very high to get a pause. For example,
ESC[MF ;;;60000
would pause your ANSI Screen for 60 seconds, or until a key
is pressed when viewing it with SMILE. Remember, these
SOUND CODES are not supported by bulletin boards...(yet)!
------------------------------------- CUT -------------------------------------